﻿using UnityEngine;
using System.Collections;
using Holoville.HOTween;

public class ResultScript : MonoBehaviour 
{
    public string target;
    public GUIText description;

	// Use this for initialization
	void Start () 
    {
        //description.text = "...";
	}
	
	// Update is called once per frame
	void Update () 
    {
	
	}

    void OnMouseDown()
    {
        HOTween.To(transform, 0.2f, new TweenParms()
                    .Prop("localScale", new Vector3(0.8f, 0.8f)));

        HOTween.To(transform, 0.2f, new TweenParms()
                    .Prop("localScale", new Vector3(1f, 1f, 1f))
                    .Delay(0.2f));

        Application.LoadLevel(target);
    }

    void SetTarget(string target)
    {
        this.target = target;
    }

    void SetText(string text)
    {
        Debug.Log("kepanggil");
        description.text = text;
    }
}
